package org.dromara.bykt.domain.bo;

import org.dromara.bykt.domain.BYKTCourseExercise;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 课后习题业务对象 course_exercise
 *
 * @author Hou
 * @date 2025-06-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BYKTCourseExercise.class, reverseConvertGenerate = false)
public class BYKTCourseExerciseBo extends BaseEntity {

    /**
     * 习题ID
     */
    private Long id;

    /**
     * 视频ID
     */
    @NotNull(message = "视频ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long videoId;

    /**
     * 课程ID
     */
    @NotNull(message = "课程ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long courseId;

    /**
     * 题目内容
     */
    @NotBlank(message = "题目内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 题目类型（0单选 1多选 2判断）
     */
    @NotBlank(message = "题目类型（0单选 1多选 2判断）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 选项内容（JSON格式）
     */
    private String options;

    /**
     * 正确答案
     */
    @NotBlank(message = "正确答案不能为空", groups = { AddGroup.class, EditGroup.class })
    private String answer;

    /**
     * 解析
     */
    private String analysis;

    /**
     * 图片
     */
    private String image;

    /**
     * 题库类型（1、习题 2、刷题 3、考试）
     */
    private String questionType;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 课程分类ID
     */
    private Long categoryId;
}
